Ext.define('carManage.view.maintainInfo.GridList', {
    extend: 'Ext.grid.Panel',
    store: 'MaintainInfoStore',
    alias: 'widget.gridList',
    selModel: Ext.create('Ext.selection.CheckboxModel', {mode: "SIMPLE"}),
    initComponent: function() {
        this.columns = [
            {
                header: '车牌号码',
                sortable: true,
                width: 85,
                dataIndex: 'car_code'
            }, {
                header: '保养人',
                sortable: true,
                width: 70,
                dataIndex: 'name'
            }, {
                header: '保养日期',
                sortable: true,
                width: 100,
                dataIndex: 'maintain_date'
            }, {
                header: '保养价格',
                sortable: true,
                width: 70,
                dataIndex: 'price'
            }, {
                header: '编号',
                sortable: true,
                hidden: true,
                dataIndex: 'id'
            }, {
                header: '保养里程',
                sortable: true,
                width: 95,
                dataIndex: 'mileage',
                renderer: function(v) {
                    return v + "公里";
                }
            }, {
                header: '修理厂',
                sortable: true,
                width: 95,
                dataIndex: 'maintain_area'
            },{
                header: '备注',
                sortable: true,
                width: 387,
                dataIndex: 'remark'
            }
        ];

        this.bbar = new Ext.PagingToolbar({
            store: 'MaintainInfoStore',
            emptyMsg: '没有数据需要显示',
            displayInfo: true
        });
        this.callParent(arguments);
    }
});